package com.yy.ssjx.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 描述: sharding-jdbc-xa2分布式事务对象
 *
 * @author: yanglin
 * @Date: 2021-11-08-14:05
 * @Version: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_sharding_xa_test2")
@ApiModel(value="sharding-jdbc-xa2分布式事务对象", description="sharding-jdbc-xa2分布式事务对象")
public class ShardingXaTest2 {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "Xa编号")
    @TableId(value = "xa_id", type = IdType.AUTO)
    public Integer xaId;

    @ApiModelProperty(value = "Xa名称")
    @TableField("xa_name")
    public String xaName;

    @ApiModelProperty(value = "Xa备注")
    @TableField("xa_remark")
    public String xaRemark;

    @ApiModelProperty(value = "删除标记（0-未删除；1-已删除）")
    @TableField("del_flg")
    public Integer delFlg;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    public String createBy;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    public Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("last_update_by")
    public String lastUpdateBy;

    @ApiModelProperty(value = "最后更新时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    @TableField(value = "last_update_time", fill = FieldFill.INSERT_UPDATE)
    public Date  lastUpdateTime;
}
